package com.s4j.struts.biz.model;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name="BIZ_MG_TREATHIS")
public class BizMgTreathis {

	private Long treathisId;
	
	private PatientDoc patient;
	
	private Integer respirator;	//是否使用呼吸机呼吸：1是  2否
	
	private String respirator_date;	//呼吸机使用时间
	
	private Integer respirator_type;	//呼吸机使用方式	1无创呼吸机辅助通气  2有创呼吸辅助通气
	
	private Integer thymusectomy;	//是否行胸腺切除术：	1是  2否
	
	private String thymusectomy_date;	//是否行胸腺切除术手术时间
	
	private Integer thymusectomy_type;	//是否行胸腺切除术手术方式	1微创  2开胸
	
	private Integer thymusectomy_rt;	//有无放疗：	1有  2无
	
	private Integer thymusectomy_ct;	//有无化疗：	1有  2无
	
	private Integer thymusectomy_pt;	//胸腺病理：	1A  2B	3AB	4C
	
	private String thymusectomy_ex;	//术后复查胸部CT情况
	
	private Integer thymusectomy_rs;	//初步治疗效果评价	1痊愈  2有效  3无效

	private List<MgTreathisWm> wm;	//西药
	
	private List<MgTreathisCm> cm;	//西药

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getTreathisId() {
		return treathisId;
	}

	public void setTreathisId(Long treathisId) {
		this.treathisId = treathisId;
	}

	@Column(precision=2)
	public Integer getRespirator() {
		return respirator;
	}

	public void setRespirator(Integer respirator) {
		this.respirator = respirator;
	}

	@Column(length=20)
	public String getRespirator_date() {
		return respirator_date;
	}

	public void setRespirator_date(String respirator_date) {
		this.respirator_date = respirator_date;
	}

	@Column(precision=2)
	public Integer getRespirator_type() {
		return respirator_type;
	}

	public void setRespirator_type(Integer respirator_type) {
		this.respirator_type = respirator_type;
	}

	@Column(precision=2)
	public Integer getThymusectomy() {
		return thymusectomy;
	}

	public void setThymusectomy(Integer thymusectomy) {
		this.thymusectomy = thymusectomy;
	}

	@Column(length=20)
	public String getThymusectomy_date() {
		return thymusectomy_date;
	}

	public void setThymusectomy_date(String thymusectomy_date) {
		this.thymusectomy_date = thymusectomy_date;
	}

	@Column(precision=2)
	public Integer getThymusectomy_type() {
		return thymusectomy_type;
	}

	public void setThymusectomy_type(Integer thymusectomy_type) {
		this.thymusectomy_type = thymusectomy_type;
	}

	@Column(precision=2)
	public Integer getThymusectomy_rt() {
		return thymusectomy_rt;
	}

	public void setThymusectomy_rt(Integer thymusectomy_rt) {
		this.thymusectomy_rt = thymusectomy_rt;
	}

	@Column(precision=2)
	public Integer getThymusectomy_ct() {
		return thymusectomy_ct;
	}

	public void setThymusectomy_ct(Integer thymusectomy_ct) {
		this.thymusectomy_ct = thymusectomy_ct;
	}

	@Column(precision=2)
	public Integer getThymusectomy_pt() {
		return thymusectomy_pt;
	}

	public void setThymusectomy_pt(Integer thymusectomy_pt) {
		this.thymusectomy_pt = thymusectomy_pt;
	}

	@Column(length=100)
	public String getThymusectomy_ex() {
		return thymusectomy_ex;
	}

	public void setThymusectomy_ex(String thymusectomy_ex) {
		this.thymusectomy_ex = thymusectomy_ex;
	}

	@Column(precision=2)
	public Integer getThymusectomy_rs() {
		return thymusectomy_rs;
	}

	public void setThymusectomy_rs(Integer thymusectomy_rs) {
		this.thymusectomy_rs = thymusectomy_rs;
	}

	@OneToMany(cascade=CascadeType.ALL,fetch=FetchType.LAZY,mappedBy="treathis")
	public List<MgTreathisWm> getWm() {
		return wm;
	}

	public void setWm(List<MgTreathisWm> wm) {
		this.wm = wm;
	}

	@OneToMany(cascade=CascadeType.ALL,fetch=FetchType.LAZY,mappedBy="treathis")
	public List<MgTreathisCm> getCm() {
		return cm;
	}

	public void setCm(List<MgTreathisCm> cm) {
		this.cm = cm;
	}

	@OneToOne  
    @JoinColumn(name="patientId",insertable=true,unique=true)
	public PatientDoc getPatient() {
		return patient;
	}

	public void setPatient(PatientDoc patient) {
		this.patient = patient;
	}
}
